<template>
	<view>
	</view>
</template>

<script>
	import api from "@/api/api";
	export default {
		async onLoad() {
			// #ifdef MP-WEIXIN
				const accountInfo = wx.getAccountInfoSync();
				const currentVersion = this.version; // 小程序当前版本号
			// #endif
			let res = await this.depot.get(api.yellowPages("appAudit/findOne?id=1"))
			let auditVersion = res && res.data && res.data.data && res.data.data.auditVersion ? res.data.data.auditVersion : null;
			console.log("auditVersion", auditVersion)
			console.log("currentVersion", currentVersion)
			let isAudit = currentVersion == auditVersion;
			// let isAudit = true;
			uni.setStorageSync("isAudit", isAudit);
			if (isAudit) {
				uni.reLaunch({
					url:"/pages/contact/index"
				})
			} else {
				uni.reLaunch({
					url:"/pages/index/index"
				})
			}
		}
	}
</script>

<style>
</style>